package citic.c.util;

import java.math.BigDecimal;
import java.util.Objects;

public class NumWithCombinUnit {

    private BigDecimal num;

    private CombinUnit unit;

    public NumWithCombinUnit(BigDecimal num, CombinUnit unit) {
        this.num = num;
        this.unit = unit;
    }

    public NumWithCombinUnit add(NumWithCombinUnit o){

        return null;
    }





    public BigDecimal getNum() {
        return num;
    }

    public void setNum(BigDecimal num) {
        this.num = num;
    }

    public CombinUnit getUnit() {
        return unit;
    }

    public Unit getBaseUnit(){
        return null;
    }

    public void setUnit(CombinUnit unit) {
        this.unit = unit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NumWithCombinUnit that = (NumWithCombinUnit) o;
        return Objects.equals(num, that.num) &&
                Objects.equals(unit, that.unit);
    }

    @Override
    public int hashCode() {
        return Objects.hash(num, unit);
    }
}
